<template>
  <div class="table-page-search-wrapper">
    <a-form layout="inline">
      <a-row>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="订单编号:">
            <a-input allowClear v-model="searchForm.orderNo" placeholder="请输入订单号" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="联系电话:">
            <a-input allowClear v-model="searchForm.phone" placeholder="请输入联系电话" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="订单状态:">
            <a-select v-model="searchForm.status" placeholder="请选择订单状态" allowClear>
              <a-select-option
                v-for="item in statuslistt"
                :key="item.status"
                :value="item.status"
              >{{item.text}}</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="创建时间:">
            <a-range-picker v-decorator="['range-picker']" style="width:100%" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="订单来源:">
            <a-select v-model="searchForm.laiyuan" placeholder="请选择订单来源" allowClear>
              <a-select-option
                v-for="item in laiyuanList"
                :key="item.status"
                :value="item.status"
              >{{item.text}}</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="所属门店:">
            <a-input allowClear v-model="searchForm.mendian" placeholder="请输入门店名称" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="配送方式:">
            <a-select v-model="searchForm.status" placeholder="请选择配送方式" allowClear>
              <a-select-option
                v-for="item in fangShilist"
                :key="item.status"
                :value="item.status"
              >{{item.text}}</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item>
            <a-button type="primary" icon="search" @click="searchAction()">查找</a-button>
            <a-button icon="delete" @click="resetSearch()" style="margin-left: 8px;">重置</a-button>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>
<script>
export default {
  name: 'search',
  props: ['keyName'],
  data() {
    return {
      statuslistt: [], //订单状态
      laiyuanList: [], //订单来源
      fangShilist: [], //配送方式
      searchForm: {}
    }
  },
  methods: {
    searchAction() {
      //执行搜索
      this.$emit('search')
    },
    resetSearch() {
      this.searchForm = {}
      this.$emit('resetSearch')
    },
    getSearchForm() {
      //获取高级搜索条件
      return {
        ...this.searchForm
      }
    }
  }
}
</script>


<style lang="less">
</style>>
